#include <bits/stdc++.h>
using namespace std;
const int MAXN = 50 + 5;
int n;

int main() {
    scanf("%d", &n);
    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= n; ++j) {
            int id = std::min({i, j, n - i + 1, n - j + 1});
            putchar(id & 1 ? '#' : '.');
        }
        puts("");
    }
    return 0;
}